package com.zwb.demo.easyweb.modules.database.entity;

import com.zwb.demo.easyweb.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 数据库连接
 */
@Table(name = "t_database_link")
@EqualsAndHashCode(callSuper = true)
@Entity
@Data
@GenericGenerator(name = "jpa-uuid", strategy = "uuid")
public class DatabaseLinkPO extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * uuid
     */
    @Id
    @GeneratedValue(generator = "jpa-uuid")
    @Column(name = "id", insertable = false, nullable = false, length = 32)
    private String id;

    /**
     * 用户名
     */
    @Column(name = "username", nullable = false)
    private String username;

    /**
     * 密码
     */
    @Column(name = "password", nullable = false)
    private String password;

    /**
     * 主机地址
     */
    @Column(name = "host", nullable = false)
    private String host;

    /**
     * 端口
     */
    @Column(name = "port", nullable = false)
    private String port;

    /**
     * 数据库名
     */
    @Column(name = "database_name", nullable = false)
    private String databaseName;

    /**
     * 数据库类型
     */
    @Column(name = "database_type", nullable = false)
    private String databaseType;

    /**
     * 连接名称
     */
    @Column(name = "link_name", nullable = false)
    private String linkName;

    
}